library(caim)
caim::clr()
# most important maturities
maturities_a = c(.25, 2, 5, 10)
# interesting maturities, level b
maturities_b = c(.0833, 1, 30)
# all other maturities will be level c
# relative weightings for each maturity level
# these will form a density function that will be normalised to sum to 1
# , so don't worry about that here
MAT_A_WT = 1
MAT_B_WT = .75
MAT_C_WT = 0.15
# set of maturities to use for lambda values
lambda_maturities <- seq(0.5, 5, 0.5)
g7_rates_info <- fread("../data/ratesinfo.csv")[
country %in% c("US", "CA", "DE", "FR", "IT", "UK", "JP") & class=="GOVT"
, .(country, class, maturity, id=bb_ticker)
]
g7_rates_data <- g7_rates_info[
fread("../data/ratesdata.csv")
,
, on=.(id), nomatch=NULL
][
, .(country
, class
, maturity
, date=lubridate::as_date(date)
, year=lubridate::year(lubridate::as_date(date))
, month=lubridate::month(lubridate::as_date(date))
, yield=PX_LAST
)
][
, .SD, key=.(country, class, maturity, date)
]
g7_curve_mats <- sort(unique(g7_rates_data$maturity))
g7_curve_columns <- paste0("yield_", g7_curve_mats)
g7_curves <- dcast(
g7_rates_data, country + class + date + year + month ~ maturity, value.var="yield"
)[
, .SD
, key=.(country, class, date)
]
setnames(g7_curves, c(key(g7_curves), g7_curve_mats), c(key(g7_curves), g7_curve_columns))
g7_curves[]
g7_mm_info <- data.table(
country=c("US", "CA", "DE", "FR", "IT", "UK", "JP", "DE", "FR", "IT")
, curncy=c("USD", "CAD", "EUR", "EUR", "EUR", "GBP", "JPY", "DEM", "FRF", "ITL")
, id=c("USD.FIX.1M", "CAD.FIX.1M", "EUR.FIX.1M", "EUR.FIX.1M", "EUR.FIX.1M"
, "GBP.FIX.1M", "JPY.FIX.1M", "DEM.FIX.1M", "FRF.FIX.1M", "ITL.FIX.1M")
)
# g7_mm_info <- fread("../data/mminfo.csv")[
# CURNCY %in% c("USD", "EUR", "GBP", "JPY", "CAD")
# , .(curncy=CURNCY, id=FIX_1M)
# ]
g7_mm_data <- g7_mm_info[
fread("../data/mmdata.csv")
,
, on=.(id), nomatch=NULL
][
, .(country
, curncy
, date = lubridate::as_date(date)
, year=lubridate::year(lubridate::as_date(date))
, month=lubridate::month(lubridate::as_date(date))
, maturity = 0.8333
, yield = PX_LAST
)
][
, .SD , key=.(country, curncy, date)
]
# stitch together pre- and post-EUR convergence data for DE, FR, IT
eur_start_date <- min(g7_mm_data[country=="DE" & curncy=="EUR"]$date)
# delete local observations where EUR data is available
g7_mm_data <- g7_mm_data[!(curncy %in% c("DEM", "FRF", "ITL") & date >= eur_start_date)]
# relabel pre-EUR local observations as EUR
# may need to rethink this if we want to implement pre- and post-EUR currency data
# - maybe label everything as DEM FRF ITL?
g7_mm_data[curncy %in% c("DEM", "FRF", "ITL"), curncy := "EUR"]
g7_mm_data[]
g7_curves_m <- g7_curves[
date %in% caim::month_end_dates(date)
]
g7_mm_data_m <- g7_mm_data[
date %in% caim::month_end_dates(date)
]
This is, admittedly, a big kludge, but should help when there are no government yields below 2-year maturity, like early Canada, etc. Also, this may be a good way to average 3-month bills and 1-month deposits as a proxy for cash when doing Nelson-Siegel analyses.
Assumption: We’ll do LIBOR - 1/8 as a crude proxy for LIBID
g7_curves_m[g7_mm_data_m, yield_0.0833 := i.yield - 0.125, on=.(country, year, month)][]
# ensure there are at least 3 yield points
g7_curves_m <- g7_curves_m[
g7_curves_m[ ,.(valid=(sum(!is.na(.SD)) >= 3)), by=.(country, class, date)]$valid
][
# find first date that works for all countries
date >= max(g7_curves_m[,.(min_date=min(date)), by=.(country, class)]$min_date)
]
curve_data <- g7_curves_m
curve_mats <- g7_curve_mats
curve_columns <- g7_curve_columns
curve_coefs <- list()
curve_ids <- unique(curve_data[,.(country, class)])
for (c in 1:nrow(curve_ids)) {
t_curve_data <- curve_data[country == curve_ids[c, country] & class == curve_ids[c, class]]
t_curve_dates <- sort(unique(t_curve_data$date))
t_curve_mats <- curve_mats #sort(unique(yield_info[curve_id==c]$maturity))
t_curve_mat_names <- curve_columns #as.character(t_curve_mats)
t_curve_mat_wts <- rep(MAT_C_WT, length(t_curve_mats))
names(t_curve_mat_wts) <- t_curve_mat_names
t_curve_mat_wts[names(t_curve_mat_wts) %in% maturities_a] <- MAT_A_WT
t_curve_mat_wts[names(t_curve_mat_wts) %in% maturities_b] <- MAT_B_WT
t_curve_mat_wts <- t_curve_mat_wts / sum(t_curve_mat_wts)
t_res <- list()
for (i in 1:length(lambda_maturities)) {
mat <- lambda_maturities[i]
lambda <- caim::ns_mat2lambda(mat)
print(paste("calculating for curve:", c, curve_ids[c, country], curve_ids[c, class], "maturity:", mat, "lambda:", lambda))
t_res[[i]] <- list(
mat=mat
, lambda=lambda
, coefs=data.table(
country=curve_ids[c, country]
, class=curve_ids[c, class]
, date=t_curve_data[,date]
, t(apply(t_curve_data, 1, function(x)
caim::ns_yields2coefs(t_curve_mats
, as.numeric(x[t_curve_mat_names])
, lambda=lambda
, wts=t_curve_mat_wts)))
, lambda_mat=mat
)
)
}
# calculate summaries
# 5 year halflife assuming 260 business days in a year
decay <- halflife2decay(5*260)
lambda_summary <- data.table(t(sapply(t_res, function(x)
c(mat=x$mat, lambda=x$lambda, wss=mean(x$coefs$wss), wss_exp=mean_exp(x$coefs$wss, decay)))))
# choose best data
best_hist_fit <- which(lambda_summary$wss == min(lambda_summary$wss))
best_exp_fit <- which(lambda_summary$wss_exp == min(lambda_summary$wss_exp))
# take average of best fits, but tilt towards best_exp_fit
best_ix <- floor(mean(c(best_hist_fit, best_exp_fit))+ifelse(best_exp_fit > best_hist_fit, 0.5, 0))
best_hist_coefs <- t_res[[best_ix]]$coefs
# best_hist_coefs$curve_id <- c
#add data to curve_coefs
curve_coefs[[length(curve_coefs)+1]] <- best_hist_coefs
}
[1] "calculating for curve: 1 CA GOVT maturity: 0.5 lambda: 3.58657038690834"
[1] "calculating for curve: 1 CA GOVT maturity: 1 lambda: 1.79328063484169"
[1] "calculating for curve: 1 CA GOVT maturity: 1.5 lambda: 1.19552075559691"
[1] "calculating for curve: 1 CA GOVT maturity: 2 lambda: 0.896641550467829"
[1] "calculating for curve: 1 CA GOVT maturity: 2.5 lambda: 0.717323931054624"
[1] "calculating for curve: 1 CA GOVT maturity: 3 lambda: 0.59776033052309"
[1] "calculating for curve: 1 CA GOVT maturity: 3.5 lambda: 0.512348203420652"
[1] "calculating for curve: 1 CA GOVT maturity: 4 lambda: 0.448335176139679"
[1] "calculating for curve: 1 CA GOVT maturity: 4.5 lambda: 0.398496343358628"
[1] "calculating for curve: 1 CA GOVT maturity: 5 lambda: 0.358681854090179"
[1] "calculating for curve: 2 DE GOVT maturity: 0.5 lambda: 3.58657038690834"
[1] "calculating for curve: 2 DE GOVT maturity: 1 lambda: 1.79328063484169"
[1] "calculating for curve: 2 DE GOVT maturity: 1.5 lambda: 1.19552075559691"
[1] "calculating for curve: 2 DE GOVT maturity: 2 lambda: 0.896641550467829"
[1] "calculating for curve: 2 DE GOVT maturity: 2.5 lambda: 0.717323931054624"
[1] "calculating for curve: 2 DE GOVT maturity: 3 lambda: 0.59776033052309"
[1] "calculating for curve: 2 DE GOVT maturity: 3.5 lambda: 0.512348203420652"
[1] "calculating for curve: 2 DE GOVT maturity: 4 lambda: 0.448335176139679"
[1] "calculating for curve: 2 DE GOVT maturity: 4.5 lambda: 0.398496343358628"
[1] "calculating for curve: 2 DE GOVT maturity: 5 lambda: 0.358681854090179"
[1] "calculating for curve: 3 FR GOVT maturity: 0.5 lambda: 3.58657038690834"
[1] "calculating for curve: 3 FR GOVT maturity: 1 lambda: 1.79328063484169"
[1] "calculating for curve: 3 FR GOVT maturity: 1.5 lambda: 1.19552075559691"
[1] "calculating for curve: 3 FR GOVT maturity: 2 lambda: 0.896641550467829"
[1] "calculating for curve: 3 FR GOVT maturity: 2.5 lambda: 0.717323931054624"
[1] "calculating for curve: 3 FR GOVT maturity: 3 lambda: 0.59776033052309"
[1] "calculating for curve: 3 FR GOVT maturity: 3.5 lambda: 0.512348203420652"
[1] "calculating for curve: 3 FR GOVT maturity: 4 lambda: 0.448335176139679"
[1] "calculating for curve: 3 FR GOVT maturity: 4.5 lambda: 0.398496343358628"
[1] "calculating for curve: 3 FR GOVT maturity: 5 lambda: 0.358681854090179"
[1] "calculating for curve: 4 IT GOVT maturity: 0.5 lambda: 3.58657038690834"
[1] "calculating for curve: 4 IT GOVT maturity: 1 lambda: 1.79328063484169"
[1] "calculating for curve: 4 IT GOVT maturity: 1.5 lambda: 1.19552075559691"
[1] "calculating for curve: 4 IT GOVT maturity: 2 lambda: 0.896641550467829"
[1] "calculating for curve: 4 IT GOVT maturity: 2.5 lambda: 0.717323931054624"
[1] "calculating for curve: 4 IT GOVT maturity: 3 lambda: 0.59776033052309"
[1] "calculating for curve: 4 IT GOVT maturity: 3.5 lambda: 0.512348203420652"
[1] "calculating for curve: 4 IT GOVT maturity: 4 lambda: 0.448335176139679"
[1] "calculating for curve: 4 IT GOVT maturity: 4.5 lambda: 0.398496343358628"
[1] "calculating for curve: 4 IT GOVT maturity: 5 lambda: 0.358681854090179"
[1] "calculating for curve: 5 JP GOVT maturity: 0.5 lambda: 3.58657038690834"
[1] "calculating for curve: 5 JP GOVT maturity: 1 lambda: 1.79328063484169"
[1] "calculating for curve: 5 JP GOVT maturity: 1.5 lambda: 1.19552075559691"
[1] "calculating for curve: 5 JP GOVT maturity: 2 lambda: 0.896641550467829"
[1] "calculating for curve: 5 JP GOVT maturity: 2.5 lambda: 0.717323931054624"
[1] "calculating for curve: 5 JP GOVT maturity: 3 lambda: 0.59776033052309"
[1] "calculating for curve: 5 JP GOVT maturity: 3.5 lambda: 0.512348203420652"
[1] "calculating for curve: 5 JP GOVT maturity: 4 lambda: 0.448335176139679"
[1] "calculating for curve: 5 JP GOVT maturity: 4.5 lambda: 0.398496343358628"
[1] "calculating for curve: 5 JP GOVT maturity: 5 lambda: 0.358681854090179"
[1] "calculating for curve: 6 UK GOVT maturity: 0.5 lambda: 3.58657038690834"
[1] "calculating for curve: 6 UK GOVT maturity: 1 lambda: 1.79328063484169"
[1] "calculating for curve: 6 UK GOVT maturity: 1.5 lambda: 1.19552075559691"
[1] "calculating for curve: 6 UK GOVT maturity: 2 lambda: 0.896641550467829"
[1] "calculating for curve: 6 UK GOVT maturity: 2.5 lambda: 0.717323931054624"
[1] "calculating for curve: 6 UK GOVT maturity: 3 lambda: 0.59776033052309"
[1] "calculating for curve: 6 UK GOVT maturity: 3.5 lambda: 0.512348203420652"
[1] "calculating for curve: 6 UK GOVT maturity: 4 lambda: 0.448335176139679"
[1] "calculating for curve: 6 UK GOVT maturity: 4.5 lambda: 0.398496343358628"
[1] "calculating for curve: 6 UK GOVT maturity: 5 lambda: 0.358681854090179"
[1] "calculating for curve: 7 US GOVT maturity: 0.5 lambda: 3.58657038690834"
[1] "calculating for curve: 7 US GOVT maturity: 1 lambda: 1.79328063484169"
[1] "calculating for curve: 7 US GOVT maturity: 1.5 lambda: 1.19552075559691"
[1] "calculating for curve: 7 US GOVT maturity: 2 lambda: 0.896641550467829"
[1] "calculating for curve: 7 US GOVT maturity: 2.5 lambda: 0.717323931054624"
[1] "calculating for curve: 7 US GOVT maturity: 3 lambda: 0.59776033052309"
[1] "calculating for curve: 7 US GOVT maturity: 3.5 lambda: 0.512348203420652"
[1] "calculating for curve: 7 US GOVT maturity: 4 lambda: 0.448335176139679"
[1] "calculating for curve: 7 US GOVT maturity: 4.5 lambda: 0.398496343358628"
[1] "calculating for curve: 7 US GOVT maturity: 5 lambda: 0.358681854090179"
ns_coefs <- rbindlist(curve_coefs)[
, .(ns_beta0 = beta0
, ns_beta1 = beta1
, ns_beta2 = beta2
, ns_lambda = lambda
, ns_lambda_mat = lambda_mat
, ns_wss = wss
)
, key=.(country, class, date)
]
g7_curves_m <- g7_curves_m[ns_coefs]
rm(list=setdiff(ls(), c("g7_curves", "g7_curves_m", "g7_rates_data", "g7_rates_info", "g7_curve_columns", "g7_curve_mats")))
long_data <- melt(
g7_curves_m
, c("country", "class", "date", "ns_beta0", "ns_beta1", "ns_beta2", "ns_lambda")
, patterns("yield_")
, value.name="yield_now"
)[
, maturity := as.numeric(stringr::str_remove(variable, "yield_"))
][
, .(country, class, date, ns_beta0, ns_beta1, ns_beta2, ns_lambda, maturity, yield_now)
]
# fill in missing yields with interpolated data
# table with !is.na(yield)
yields_valid <- long_data[!is.na(yield_now)][, c("mat", "yld") := .(maturity, yield_now)]
# table mapping to <=
yields_lo <- yields_valid[long_data, .(country, date, maturity, m_lo0=mat, y_lo0=yld), on=.(country, date, maturity), roll=T]
# table mapping to >=
yields_hi <- yields_valid[long_data, .(country, date, maturity, m_hi0=mat, y_hi0=yld), on=.(country, date, maturity), roll=-Inf]
yields_lin <- yields_hi[
yields_lo
, .(
country
, date
, maturity
, yield_lin = ifelse(m_hi0 == m_lo0
, y_hi0
, y_lo0 + (maturity - m_lo0) * (y_hi0 - y_lo0) / (m_hi0 - m_lo0)
)
, y_hi0
, y_lo0
, m_hi0
, m_lo0
)
, on=.(country, date, maturity)
]
long_data <- long_data[yields_lin, on=.(country, date, maturity)]
long_data <- long_data[
, c("num_coups", "mod_dur") := .(
ifelse(maturity > 0.25, ifelse(country=="US", 2, 1), 0)
, maturity
)
][
maturity > 0.25
, mod_dur := round(caim::modified_duration(yield_lin / 100, yield_lin / 100, maturity, num_coups), 6)
][
, .(
ns_beta0
, ns_beta1
, ns_beta2
, ns_lambda
, num_coups
, mod_dur #= round(caim::modified_duration(yield_now / 100, yield_now / 100, maturity, 1), 6)
, yield_now
, yield_lin
, y_hi0
, y_lo0
, m_hi0
, m_lo0
)
, key=.(country, class, maturity, date)
][
, yield_prev := shift(yield_lin), by = .(country, class, maturity)
][
, c("y_hi1", "y_lo1", "m_hi1", "m_lo1") := .(
yield_lin
, shift(yield_lin)
, maturity
, shift(maturity)
)
, by = .(country, class, date)
][
, yield_sell_lin := (
y_lo1 + ((m_hi1 - 1/12) - m_lo1) * (y_hi1 - y_lo1) / (m_hi1 - m_lo1)
)
][
, yield_buy_ns := round(caim::ns_coefs2yields(
mats = maturity
, beta0 = shift(ns_beta0)
, beta1 = shift(ns_beta1)
, beta2 = shift(ns_beta2)
, lambda = shift(ns_lambda)
)$y, 4)
, by = .(country, class, maturity)
][
, yield_sell_ns := round(caim::ns_coefs2yields(
mats = maturity - 1/2
, beta0 = ns_beta0
, beta1 = ns_beta1
, beta2 = ns_beta2
, lambda = ns_lambda
)$y, 4)
][
, coup_inc_lin := round(yield_prev / 1200, 6)
][
, shift_inc := ifelse(maturity > 0.25, round((yield_lin - yield_prev) / 100 * -mod_dur, 6), 0)
][
, tot_ret_shift := coup_inc_lin + shift_inc
][
, dur_inc_lin := ifelse(
maturity > 0.25
, round(caim::bond_price(yield_sell_lin / 100, yield_prev / 100, maturity - 1/12, 1, 1) - 1, 6)
, 0
)
][
, tot_ret_lin := coup_inc_lin + dur_inc_lin
][
, coup_inc_ns := round(yield_buy_ns / 1200, 6)
][
, price_inc_ns := ifelse(
maturity > 0.25
, round(caim::bond_price(yield_sell_ns / 100, yield_buy_ns / 100, maturity - 1/12, 1, 1) - 1, 6)
, 0
)
][
, tot_ret_ns := coup_inc_ns + price_inc_ns
]
long_data[country=="US"]
wide_data <- dcast(
long_data
,country + class + date + ns_beta0 + ns_beta1 + ns_beta2 + ns_lambda ~ maturity
, value.var = names(long_data)[!(names(long_data) %in% c("country", "class", "date", "ns_beta0", "ns_beta1", "ns_beta2", "ns_lambda", "maturity"))]
# , value.var = c("mod_dur", "yield_now", "yield_prev", "yield_buy_ns", "yield_sell_ns"
# , "coup_inc_lin", "dur_inc_lin", "coup_inc_ns", "price_inc_ns", "tot_ret_ns"
# )
)
wide_data[]
g7_return_data <- dcast(
long_data[maturity %in% c(0.0833, 1, 2, 3, 5, 7, 10)]
, country + class + date ~ maturity
, value.var = c("coup_inc_lin", "tot_ret_shift", "tot_ret_lin", "tot_ret_ns")
)
g7_return_data[]
g7_assets <- data.table(
id=c("US.GOVT.13", "US.GOVT.15", "US.GOVT.110"
, "CA.GOVT.13", "CA.GOVT.15", "CA.GOVT.110"
, "DE.GOVT.13", "DE.GOVT.15", "DE.GOVT.110"
, "FR.GOVT.13", "FR.GOVT.15", "FR.GOVT.110"
, "IT.GOVT.13", "IT.GOVT.15", "IT.GOVT.110"
, "UK.GOVT.13", "UK.GOVT.15", "UK.GOVT.110"
, "JP.GOVT.13", "JP.GOVT.15", "JP.GOVT.110"
)
, country=c(rep("US", 3), rep("CA", 3), rep("DE", 3), rep("FR", 3), rep("IT", 3)
, rep("UK", 3), rep("JP", 3))
, maturity=rep(c(13, 15, 110), 7)
, key=c("country", "maturity")
)
g7_asset_info <- fread("../data/assetinfo.csv")[suggname %in% g7_assets$id]
g7_asset_info[]
g7_asset_data <- g7_assets[
fread("../data/assetdata.csv")
, .(
country
, maturity
, id
, date = lubridate::as_date(date)
, year = lubridate::year(date)
, month = lubridate::month(date)
, index_nav=PX_LAST
)
, on=.(id), nomatch=NULL
][
date %in% caim::month_end_dates(date)
, .SD
, key=.(country, maturity, date)
][
, index_ret := round(index_nav / shift(index_nav) - 1, 6)
, by=.(country, maturity)
]
|--------------------------------------------------|
|==================================================|
g7_asset_data[]
g7_models <- list(
list(name="x_g13_coup_bullet", maturity=13, features=c("coup_inc_lin_2"), unity_coefs=T)
, list(name="x_g13_coup_bullet", maturity=13, features=c("tot_ret_shift_2"), unity_coefs=T)
, list(name="x_g13_lin_bullet", maturity=13, features=c("tot_ret_lin_2"), unity_coefs=T)
, list(name="x_g13_ns_bullet", maturity=13, features=c("tot_ret_ns_2"), unity_coefs=T)
, list(name="x_g13_coup_n", maturity=13, features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3"), unity_coefs=T)
, list(name="x_g13_shift_n", maturity=13, features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3"), unity_coefs=T)
, list(name="x_g13_lin_n", maturity=13, features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3"), unity_coefs=T)
, list(name="x_g13_ns_n", maturity=13, features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3"), unity_coefs=T)
, list(name="x_g13_coup_ladder", maturity=13, features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3"), unity_coefs=F)
, list(name="x_g13_shift_ladder", maturity=13, features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3"), unity_coefs=F)
, list(name="x_g13_lin_ladder", maturity=13, features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3"), unity_coefs=F)
, list(name="x_g13_ns_ladder", maturity=13, features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3"), unity_coefs=F)
, list(name="x_g15_coup_bullet", maturity=15, features=c("coup_inc_lin_3"), unity_coefs=T)
, list(name="x_g15_coup_bullet", maturity=15, features=c("tot_ret_shift_3"), unity_coefs=T)
, list(name="x_g15_lin_bullet", maturity=15, features=c("tot_ret_lin_3"), unity_coefs=T)
, list(name="x_g15_ns_bullet", maturity=15, features=c("tot_ret_ns_3"), unity_coefs=T)
, list(name="x_g15_coup_n", maturity=15, features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3", "coup_inc_lin_5"), unity_coefs=T)
, list(name="x_g15_shift_n", maturity=15, features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3", "tot_ret_shift_5"), unity_coefs=T)
, list(name="x_g15_lin_n", maturity=15, features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3", "tot_ret_lin_5"), unity_coefs=T)
, list(name="x_g15_ns_n", maturity=15, features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3", "tot_ret_ns_5"), unity_coefs=T)
, list(name="x_g15_coup_ladder", maturity=15, features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3", "coup_inc_lin_5"), unity_coefs=F)
, list(name="x_g15_shift_ladder", maturity=15, features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3", "tot_ret_shift_5"), unity_coefs=F)
, list(name="x_g15_lin_ladder", maturity=15, features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3", "tot_ret_lin_5"), unity_coefs=F)
, list(name="x_g15_ns_ladder", maturity=15, features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3", "tot_ret_ns_5"), unity_coefs=F)
, list(name="x_g110_coup_bullet", maturity=110, features=c("coup_inc_lin_5"), unity_coefs=T)
, list(name="x_g110_coup_bullet", maturity=110, features=c("tot_ret_shift_5"), unity_coefs=T)
, list(name="x_g110_lin_bullet", maturity=110, features=c("tot_ret_lin_5"), unity_coefs=T)
, list(name="x_g110_ns_bullet", maturity=110, features=c("tot_ret_ns_5"), unity_coefs=T)
, list(name="x_g110_coup_n", maturity=110, features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3", "coup_inc_lin_5", "coup_inc_lin_7", "coup_inc_lin_10"), unity_coefs=T)
, list(name="x_g110_shift_n", maturity=110, features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3", "tot_ret_shift_5", "tot_ret_shift_7", "tot_ret_shift_10"), unity_coefs=T)
, list(name="x_g110_lin_n", maturity=110, features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3", "tot_ret_lin_5", "tot_ret_lin_7", "tot_ret_lin_10"), unity_coefs=T)
, list(name="x_g110_ns_n", maturity=110, features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3", "tot_ret_ns_5", "tot_ret_ns_7", "tot_ret_ns_10"), unity_coefs=T)
, list(name="x_g110_coup_ladder", maturity=110, features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3", "coup_inc_lin_5", "coup_inc_lin_7", "coup_inc_lin_10"), unity_coefs=F)
, list(name="x_g110_shift_ladder", maturity=110, features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3", "tot_ret_shift_5", "tot_ret_shift_7", "tot_ret_shift_10"), unity_coefs=F)
, list(name="x_g110_lin_ladder", maturity=110, features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3", "tot_ret_lin_5", "tot_ret_lin_7", "tot_ret_lin_10"), unity_coefs=F)
, list(name="x_g110_ns_ladder", maturity=110, features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3", "tot_ret_ns_5", "tot_ret_ns_7", "tot_ret_ns_10"), unity_coefs=F)
)
g7_features <- sort(unique(rbindlist(lapply(g7_models, function(x) data.table(feature=x$features))))$feature)
# g13_models[["x_g13_coup_bullet"]] <- list(features=c("coup_inc_lin_2"), unity_coefs=T)
# g13_models[["x_g13_shift_bullet"]] <- list(features=c("tot_ret_shift_2"), unity_coefs=T)
# g13_models[["x_g13_lin_bullet"]] <- list(features=c("tot_ret_lin_2"), unity_coefs=T)
# g13_models[["x_g13_ns_bullet"]] <- list(features=c("tot_ret_ns_2"), unity_coefs=T)
#
# g13_models[["x_g13_coup_n"]] <- list(features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3"), unity_coefs=T)
# g13_models[["x_g13_shift_n"]] <- list(features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3"), unity_coefs=T)
# g13_models[["x_g13_lin_n"]] <- list(features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3"), unity_coefs=T)
# g13_models[["x_g13_ns_n"]] <- list(features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3"), unity_coefs=T)
#
# g13_models[["x_g13_coup_ladder"]] <- list(features=c("coup_inc_lin_1", "coup_inc_lin_2", "coup_inc_lin_3"), unity_coefs=F)
# g13_models[["x_g13_shift_ladder"]] <- list(features=c("tot_ret_shift_1", "tot_ret_shift_2", "tot_ret_shift_3"), unity_coefs=F)
# g13_models[["x_g13_lin_ladder"]] <- list(features=c("tot_ret_lin_1", "tot_ret_lin_2", "tot_ret_lin_3"), unity_coefs=F)
# g13_models[["x_g13_ns_ladder"]] <- list(features=c("tot_ret_ns_1", "tot_ret_ns_2", "tot_ret_ns_3"), unity_coefs=F)
#
fah[]
[[1]]
[[1]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.189468 0.000021 0.004588 NA NA -0.000601 0.004556 -0.007186 0.015783
[[1]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.949463 0.000002 0.001497 NA NA -0.000299 0.001469 -0.003586 0.005089
[[1]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.952774 0.000002 0.001274 NA NA -0.000011 0.001276 -0.000134 0.004422
[[1]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.864476 0.000007 0.002645 NA NA 0.001754 0.001982 0.021253 0.006867
[[1]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.191281 0.000021 0.004588 NA NA -0.000612 0.004554 -0.007318 0.015777
[[1]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.954642 0.000002 0.001263 NA NA -0.000314 0.001225 -0.003759 0.004244
[[1]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.959402 0.000001 0.001076 NA NA -0.000028 0.001078 -0.000333 0.003733
[[1]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.882299 0.000006 0.002441 NA NA 0.001642 0.001810 0.019877 0.006271
[[1]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.189468 0.000022 0.004676 NA NA -0.001084 0.004556 -0.012934 0.015783
[[1]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.955921 0.000001 0.001100 NA NA -0.000271 0.001067 -0.003244 0.003698
[[1]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.959996 0.000001 0.001029 NA NA -0.000164 0.001017 -0.001972 0.003524
[[1]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.885104 0.000003 0.001797 NA NA 0.000479 0.001735 0.005768 0.006010
[[2]]
[[2]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.132916 0.000038 0.006193 NA NA -0.000797 0.006151 -0.009526 0.021308
[[2]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.922929 0.000007 0.002693 NA NA -0.000323 0.002678 -0.003868 0.009277
[[2]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.927751 0.000006 0.002497 NA NA 0.000051 0.002501 0.000612 0.008664
[[2]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.921147 0.000012 0.003426 NA NA 0.002446 0.002403 0.029744 0.008324
[[2]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.131729 0.000039 0.006210 NA NA -0.000862 0.006160 -0.010300 0.021339
[[2]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.956016 0.000002 0.001522 NA NA -0.000441 0.001459 -0.005274 0.005054
[[2]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.958895 0.000002 0.001359 NA NA -0.000114 0.001356 -0.001371 0.004698
[[2]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.924947 0.000007 0.002628 NA NA 0.001860 0.001859 0.022553 0.006439
[[2]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.130520 0.000039 0.006269 NA NA -0.001225 0.006158 -0.014602 0.021333
[[2]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.951667 0.000002 0.001506 NA NA -0.000364 0.001463 -0.004358 0.005069
[[2]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.954714 0.000002 0.001428 NA NA -0.000216 0.001414 -0.002591 0.004897
[[2]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.928875 0.000003 0.001796 NA NA 0.000404 0.001753 0.004856 0.006072
[[3]]
[[3]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.077622 0.000079 0.008879 NA NA -0.000988 0.008838 -0.011795 0.030617
[[3]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.953403 0.000011 0.003389 NA NA -0.000195 0.003389 -0.002339 0.011739
[[3]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.952457 0.000011 0.003261 NA NA 0.000252 0.003257 0.003024 0.011282
[[3]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.938262 0.000025 0.004988 NA NA 0.003142 0.003880 0.038363 0.013441
[[3]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.077686 0.000079 0.008898 NA NA -0.001110 0.008843 -0.013239 0.030632
[[3]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.969819 0.000003 0.001769 NA NA -0.000377 0.001731 -0.004509 0.005997
[[3]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.970536 0.000003 0.001648 NA NA 0.000007 0.001651 0.000084 0.005718
[[3]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.956928 0.000009 0.002918 NA NA 0.002102 0.002028 0.025514 0.007025
[[3]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.076562 0.000080 0.008955 NA NA -0.001505 0.008842 -0.017910 0.030629
[[3]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.968438 0.000003 0.001808 NA NA -0.000465 0.001750 -0.005568 0.006063
[[3]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.969906 0.000003 0.001731 NA NA -0.000305 0.001707 -0.003650 0.005913
[[3]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.946728 0.000005 0.002198 NA NA 0.000518 0.002139 0.006240 0.007411
[[4]]
[[4]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.258641 0.000012 0.003420 NA NA -0.000629 0.003368 -0.007519 0.011666
[[4]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.955748 0.000001 0.000982 NA NA -0.000188 0.000965 -0.002255 0.003344
[[4]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.961878 0.000001 0.000827 NA NA -0.000006 0.000829 -0.000069 0.002871
[[4]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.852544 0.000005 0.002148 NA NA 0.001423 0.001611 0.017211 0.005581
[[4]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.258655 0.000012 0.003420 NA NA -0.000623 0.003368 -0.007445 0.011667
[[4]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.957990 0.000001 0.000907 NA NA -0.000184 0.000889 -0.002205 0.003081
[[4]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.965088 0.000001 0.000762 NA NA 0.000043 0.000762 0.000515 0.002639
[[4]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.870840 0.000004 0.002044 NA NA 0.001410 0.001482 0.017054 0.005135
[[4]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.260315 0.000011 0.003376 NA NA -0.000370 0.003361 -0.004427 0.011642
[[4]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.963406 0.000001 0.000755 NA NA -0.000127 0.000746 -0.001522 0.002584
[[4]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.969115 0.000000 0.000684 NA NA 0.000023 0.000685 0.000278 0.002373
[[4]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.834595 0.000003 0.001745 NA NA 0.000732 0.001587 0.008815 0.005498
[[5]]
[[5]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.142016 0.000025 0.005047 NA NA -0.000930 0.004969 -0.011105 0.017214
[[5]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.927627 0.000004 0.001889 NA NA -0.000284 0.001871 -0.003402 0.006481
[[5]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.934587 0.000003 0.001711 NA NA 0.000063 0.001713 0.000757 0.005933
[[5]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.926171 0.000009 0.003060 NA NA 0.002514 0.001748 0.030588 0.006055
[[5]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.141639 0.000026 0.005057 NA NA -0.000963 0.004973 -0.011497 0.017226
[[5]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.952708 0.000002 0.001249 NA NA -0.000376 0.001193 -0.004508 0.004131
[[5]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.955835 0.000001 0.001129 NA NA -0.000081 0.001128 -0.000972 0.003908
[[5]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.930018 0.000005 0.002338 NA NA 0.001854 0.001427 0.022477 0.004945
[[5]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.146361 0.000025 0.004977 NA NA -0.000506 0.004959 -0.006060 0.017179
[[5]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.959687 0.000001 0.001091 NA NA -0.000149 0.001082 -0.001787 0.003748
[[5]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.962197 0.000001 0.001042 NA NA -0.000058 0.001042 -0.000701 0.003611
[[5]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.928945 0.000002 0.001533 NA NA 0.000464 0.001464 0.005585 0.005071
[[6]]
[[6]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.067152 0.000059 0.007669 NA NA -0.001308 0.007569 -0.015582 0.026219
[[6]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.893502 0.000013 0.003645 NA NA -0.000277 0.003641 -0.003318 0.012613
[[6]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.892557 0.000013 0.003543 NA NA 0.000224 0.003542 0.002696 0.012270
[[6]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.945179 0.000023 0.004812 NA NA 0.003863 0.002874 0.047351 0.009954
[[6]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.064771 0.000059 0.007691 NA NA -0.001385 0.007578 -0.016496 0.026252
[[6]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.889161 0.000008 0.002823 NA NA -0.000431 0.002795 -0.005163 0.009681
[[6]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.888709 0.000008 0.002745 NA NA -0.000040 0.002749 -0.000480 0.009524
[[6]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.965868 0.000008 0.002799 NA NA 0.002363 0.001501 0.028732 0.005201
[[6]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.068139 0.000057 0.007564 NA NA -0.000441 0.007563 -0.005278 0.026200
[[6]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.896386 0.000007 0.002558 NA NA -0.000042 0.002562 -0.000508 0.008875
[[6]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.894292 0.000007 0.002574 NA NA -0.000047 0.002578 -0.000560 0.008931
[[6]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.967268 0.000002 0.001438 NA NA 0.000237 0.001421 0.002845 0.004923
[[7]]
[[7]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.231993 0.000012 0.003506 NA NA -0.000636 0.003453 -0.007611 0.011962
[[7]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.908805 0.000002 0.001402 NA NA -0.000244 0.001383 -0.002925 0.004791
[[7]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.917408 0.000001 0.001225 NA NA 0.000029 0.001226 0.000348 0.004248
[[7]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.816217 0.000005 0.002302 NA NA 0.001470 0.001775 0.017782 0.006149
[[7]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.233744 0.000012 0.003504 NA NA -0.000646 0.003450 -0.007729 0.011951
[[7]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.931390 0.000001 0.001180 NA NA -0.000253 0.001154 -0.003030 0.003998
[[7]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.936686 0.000001 0.001039 NA NA -0.000023 0.001040 -0.000280 0.003603
[[7]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.842242 0.000005 0.002173 NA NA 0.001451 0.001621 0.017550 0.005614
[[7]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.231993 0.000012 0.003478 NA NA -0.000461 0.003453 -0.005519 0.011962
[[7]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.935031 0.000001 0.001015 NA NA -0.000166 0.001004 -0.001988 0.003476
[[7]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.939444 0.000001 0.000975 NA NA -0.000096 0.000972 -0.001157 0.003367
[[7]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.805760 0.000003 0.001813 NA NA 0.000509 0.001743 0.006128 0.006037
[[8]]
[[8]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.119365 0.000028 0.005278 NA NA -0.000941 0.005203 -0.011230 0.018022
[[8]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.895457 0.000005 0.002204 NA NA -0.000361 0.002178 -0.004322 0.007545
[[8]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.900149 0.000004 0.002037 NA NA -0.000011 0.002041 -0.000136 0.007069
[[8]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.895486 0.000010 0.003118 NA NA 0.002445 0.001939 0.029733 0.006718
[[8]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.119190 0.000028 0.005286 NA NA -0.000977 0.005204 -0.011662 0.018027
[[8]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.943907 0.000002 0.001405 NA NA -0.000451 0.001333 -0.005393 0.004616
[[8]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.946785 0.000002 0.001282 NA NA -0.000122 0.001279 -0.001467 0.004429
[[8]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.905828 0.000006 0.002515 NA NA 0.001856 0.001700 0.022498 0.005890
[[8]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.126021 0.000027 0.005209 NA NA -0.000563 0.005187 -0.006730 0.017968
[[8]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.934292 0.000002 0.001449 NA NA -0.000205 0.001437 -0.002455 0.004978
[[8]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.938960 0.000002 0.001410 NA NA -0.000138 0.001405 -0.001653 0.004868
[[8]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.911178 0.000003 0.001769 NA NA 0.000085 0.001770 0.001025 0.006131
[[9]]
[[9]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.053242 0.000068 0.008271 NA NA -0.001380 0.008169 -0.016441 0.028297
[[9]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.923597 0.000010 0.003183 NA NA -0.000455 0.003156 -0.005447 0.010932
[[9]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.923503 0.000009 0.003050 NA NA 0.000169 0.003050 0.002031 0.010566
[[9]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.906526 0.000024 0.004873 NA NA 0.003659 0.003224 0.044803 0.011167
[[9]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.051208 0.000069 0.008297 NA NA -0.001484 0.008177 -0.017661 0.028325
[[9]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.961551 0.000003 0.001772 NA NA -0.000643 0.001654 -0.007690 0.005729
[[9]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.963081 0.000003 0.001619 NA NA -0.000170 0.001612 -0.002041 0.005585
[[9]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.943097 0.000009 0.003032 NA NA 0.002277 0.002005 0.027672 0.006944
[[9]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.059610 0.000067 0.008173 NA NA -0.000776 0.008150 -0.009268 0.028233
[[9]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.958811 0.000003 0.001712 NA NA -0.000118 0.001710 -0.001416 0.005925
[[9]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.961451 0.000003 0.001657 NA NA -0.000185 0.001650 -0.002220 0.005715
[[9]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.946075 0.000004 0.002010 NA NA -0.000466 0.001958 -0.005576 0.006784
[[10]]
[[10]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.191719 0.000042 0.006480 NA NA -0.000938 0.006423 -0.011202 0.022251
[[10]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.947218 0.000004 0.001957 NA NA -0.000265 0.001942 -0.003178 0.006729
[[10]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.950546 0.000003 0.001720 NA NA 0.000112 0.001720 0.001340 0.005957
[[10]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.881665 0.000012 0.003459 NA NA 0.002394 0.002500 0.029113 0.008661
[[10]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.188908 0.000042 0.006493 NA NA -0.000952 0.006433 -0.011363 0.022286
[[10]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.964150 0.000002 0.001507 NA NA -0.000299 0.001479 -0.003581 0.005124
[[10]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.966702 0.000002 0.001323 NA NA 0.000033 0.001324 0.000402 0.004588
[[10]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.899475 0.000010 0.003197 NA NA 0.002254 0.002272 0.027383 0.007870
[[10]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.192101 0.000042 0.006469 NA NA -0.000832 0.006426 -0.009943 0.022262
[[10]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.950044 0.000003 0.001745 NA NA 0.000220 0.001734 0.002637 0.006007
[[10]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.950603 0.000003 0.001722 NA NA 0.000172 0.001716 0.002066 0.005945
[[10]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.909681 0.000005 0.002235 NA NA -0.000420 0.002199 -0.005030 0.007616
[[11]]
[[11]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.133502 0.000076 0.008694 NA NA -0.001148 0.008632 -0.013690 0.029904
[[11]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.953255 0.000008 0.002884 NA NA -0.000201 0.002882 -0.002412 0.009985
[[11]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.953062 0.000007 0.002675 NA NA 0.000302 0.002663 0.003628 0.009224
[[11]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.933523 0.000022 0.004645 NA NA 0.003600 0.002940 0.044066 0.010183
[[11]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.131402 0.000076 0.008714 NA NA -0.001233 0.008641 -0.014698 0.029933
[[11]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.966094 0.000003 0.001791 NA NA -0.000386 0.001752 -0.004627 0.006068
[[11]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.968467 0.000003 0.001635 NA NA 0.000018 0.001638 0.000212 0.005675
[[11]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.940604 0.000012 0.003531 NA NA 0.002724 0.002250 0.033184 0.007794
[[11]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.133502 0.000076 0.008730 NA NA -0.001399 0.008632 -0.016664 0.029904
[[11]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.961279 0.000005 0.002253 NA NA 0.000529 0.002193 0.006366 0.007598
[[11]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.963395 0.000004 0.002092 NA NA 0.000292 0.002075 0.003509 0.007188
[[11]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.945558 0.000006 0.002434 NA NA -0.000732 0.002325 -0.008748 0.008054
[[12]]
[[12]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.087204 0.000147 0.012121 NA NA -0.001542 0.012043 -0.018345 0.041718
[[12]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.953391 0.000020 0.004470 NA NA -0.000114 0.004476 -0.001365 0.015506
[[12]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.953613 0.000018 0.004281 NA NA 0.000505 0.004259 0.006081 0.014753
[[12]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.951694 0.000044 0.006623 NA NA 0.004670 0.004703 0.057508 0.016293
[[12]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.087566 0.000147 0.012139 NA NA -0.001683 0.012042 -0.020015 0.041716
[[12]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.966645 0.000006 0.002367 NA NA -0.000458 0.002326 -0.005479 0.008058
[[12]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.968507 0.000005 0.002224 NA NA 0.000063 0.002227 0.000753 0.007714
[[12]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.964060 0.000015 0.003857 NA NA 0.003017 0.002407 0.036809 0.008337
[[12]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.091780 0.000151 0.012295 NA NA -0.002615 0.012035 -0.030932 0.041689
[[12]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.969046 0.000007 0.002555 NA NA 0.000706 0.002460 0.008510 0.008522
[[12]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.970448 0.000006 0.002375 NA NA 0.000310 0.002359 0.003723 0.008172
[[12]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.964764 0.000007 0.002719 NA NA -0.001116 0.002484 -0.013315 0.008605
[[13]]
[[13]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.219293 0.000006 0.002468 NA NA -0.000443 0.002432 -0.005304 0.008423
[[13]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.870213 0.000001 0.001001 NA NA -0.000224 0.000978 -0.002680 0.003387
[[13]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.875400 0.000001 0.000943 NA NA -0.000071 0.000942 -0.000854 0.003263
[[13]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.775748 0.000003 0.001591 NA NA 0.000796 0.001380 0.009594 0.004782
[[13]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.222453 0.000006 0.002464 NA NA -0.000441 0.002429 -0.005274 0.008414
[[13]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.901902 0.000001 0.000874 NA NA -0.000213 0.000849 -0.002557 0.002941
[[13]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.909624 0.000001 0.000802 NA NA -0.000054 0.000802 -0.000645 0.002778
[[13]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.796224 0.000002 0.001566 NA NA 0.000858 0.001312 0.010340 0.004545
[[13]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.231389 0.000006 0.002422 NA NA -0.000313 0.002406 -0.003747 0.008334
[[13]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.901364 0.000001 0.000859 NA NA -0.000213 0.000834 -0.002555 0.002888
[[13]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.908864 0.000001 0.000803 NA NA -0.000075 0.000801 -0.000896 0.002775
[[13]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.790903 0.000002 0.001550 NA NA 0.000918 0.001251 0.011068 0.004333
[[14]]
[[14]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.161148 0.000017 0.004107 NA NA -0.000782 0.004038 -0.009346 0.013989
[[14]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.900221 0.000002 0.001460 NA NA -0.000428 0.001398 -0.005129 0.004843
[[14]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.908308 0.000002 0.001329 NA NA -0.000174 0.001320 -0.002082 0.004574
[[14]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.864549 0.000005 0.002266 NA NA 0.001550 0.001655 0.018756 0.005735
[[14]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.153073 0.000017 0.004120 NA NA -0.000791 0.004050 -0.009453 0.014030
[[14]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.909785 0.000002 0.001369 NA NA -0.000452 0.001294 -0.005411 0.004484
[[14]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.915251 0.000002 0.001285 NA NA -0.000194 0.001272 -0.002323 0.004407
[[14]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.862332 0.000004 0.002003 NA NA 0.001233 0.001581 0.014892 0.005478
[[14]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.153671 0.000016 0.004035 NA NA -0.000465 0.004015 -0.005569 0.013908
[[14]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.910073 0.000002 0.001333 NA NA -0.000385 0.001278 -0.004610 0.004428
[[14]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.915723 0.000002 0.001242 NA NA -0.000134 0.001237 -0.001603 0.004284
[[14]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.861512 0.000003 0.001779 NA NA 0.000802 0.001591 0.009665 0.005512
[[15]]
[[15]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.100856 0.000049 0.007030 NA NA -0.001372 0.006907 -0.016336 0.023925
[[15]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.868617 0.000008 0.002902 NA NA -0.000697 0.002822 -0.008328 0.009777
[[15]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.872371 0.000008 0.002756 NA NA -0.000142 0.002757 -0.001709 0.009552
[[15]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.880765 0.000015 0.003902 NA NA 0.002829 0.002692 0.034481 0.009324
[[15]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.096949 0.000050 0.007058 NA NA -0.001413 0.006926 -0.016827 0.023993
[[15]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.884530 0.000006 0.002541 NA NA -0.000767 0.002427 -0.009170 0.008407
[[15]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.887406 0.000006 0.002428 NA NA -0.000347 0.002407 -0.004151 0.008339
[[15]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.875978 0.000010 0.003096 NA NA 0.001824 0.002507 0.022105 0.008683
[[15]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.090787 0.000048 0.006918 NA NA -0.000701 0.006894 -0.008382 0.023882
[[15]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.887062 0.000006 0.002469 NA NA -0.000623 0.002393 -0.007454 0.008289
[[15]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.890474 0.000006 0.002369 NA NA -0.000276 0.002356 -0.003309 0.008162
[[15]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.871569 0.000007 0.002719 NA NA 0.000952 0.002551 0.011488 0.008837
[[16]]
[[16]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.233240 0.000016 0.004056 NA NA -0.000604 0.004018 -0.007229 0.013918
[[16]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.882893 0.000003 0.001767 NA NA -0.000237 0.001754 -0.002837 0.006074
[[16]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.876683 0.000003 0.001699 NA NA -0.000119 0.001697 -0.001426 0.005880
[[16]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.756171 0.000006 0.002464 NA NA 0.000892 0.002301 0.010752 0.007970
[[16]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.239139 0.000016 0.004041 NA NA -0.000596 0.004004 -0.007125 0.013869
[[16]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.908610 0.000002 0.001458 NA NA -0.000208 0.001445 -0.002496 0.005007
[[16]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.910988 0.000002 0.001381 NA NA -0.000104 0.001379 -0.001245 0.004778
[[16]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.782558 0.000005 0.002317 NA NA 0.000864 0.002154 0.010415 0.007461
[[16]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.237948 0.000016 0.004041 NA NA -0.000568 0.004007 -0.006798 0.013881
[[16]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.907193 0.000002 0.001454 NA NA -0.000107 0.001453 -0.001279 0.005033
[[16]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.910008 0.000002 0.001396 NA NA -0.000073 0.001396 -0.000878 0.004837
[[16]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.792889 0.000004 0.002088 NA NA -0.000003 0.002092 -0.000032 0.007247
[[17]]
[[17]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.122243 0.000035 0.005922 NA NA -0.000868 0.005868 -0.010363 0.020327
[[17]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.892193 0.000005 0.002264 NA NA -0.000271 0.002252 -0.003243 0.007800
[[17]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.893375 0.000005 0.002167 NA NA 0.000014 0.002171 0.000172 0.007519
[[17]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.825788 0.000009 0.003070 NA NA 0.001427 0.002722 0.017260 0.009431
[[17]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.123246 0.000035 0.005926 NA NA -0.000913 0.005865 -0.010897 0.020318
[[17]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.919275 0.000003 0.001817 NA NA -0.000381 0.001779 -0.004558 0.006164
[[17]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.923309 0.000003 0.001762 NA NA -0.000225 0.001750 -0.002701 0.006064
[[17]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.849578 0.000007 0.002633 NA NA 0.001013 0.002435 0.012226 0.008434
[[17]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.126121 0.000035 0.005888 NA NA -0.000667 0.005860 -0.007972 0.020300
[[17]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.919503 0.000003 0.001827 NA NA -0.000093 0.001827 -0.001120 0.006330
[[17]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.923453 0.000003 0.001759 NA NA -0.000159 0.001754 -0.001906 0.006078
[[17]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.866513 0.000005 0.002320 NA NA -0.000399 0.002290 -0.004782 0.007931
[[18]]
[[18]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.058906 0.000087 0.009321 NA NA -0.001310 0.009244 -0.015607 0.032023
[[18]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.925986 0.000009 0.002968 NA NA -0.000344 0.002953 -0.004123 0.010231
[[18]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.924766 0.000008 0.002870 NA NA -0.000036 0.002875 -0.000436 0.009958
[[18]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.853375 0.000021 0.004535 NA NA 0.002015 0.004069 0.024451 0.014096
[[18]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.057684 0.000087 0.009340 NA NA -0.001402 0.009249 -0.016699 0.032040
[[18]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.952357 0.000005 0.002145 NA NA -0.000509 0.002087 -0.006087 0.007230
[[18]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.955415 0.000004 0.002073 NA NA -0.000296 0.002055 -0.003546 0.007119
[[18]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.911731 0.000010 0.003084 NA NA 0.001129 0.002875 0.013638 0.009959
[[18]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.062435 0.000086 0.009261 NA NA -0.000794 0.009242 -0.009492 0.032016
[[18]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.947709 0.000005 0.002207 NA NA -0.000148 0.002206 -0.001777 0.007642
[[18]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.950554 0.000005 0.002177 NA NA -0.000253 0.002166 -0.003027 0.007504
[[18]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.922102 0.000008 0.002839 NA NA -0.000755 0.002741 -0.009020 0.009496
[[19]]
[[19]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.195397 0.000015 0.003898 NA NA -0.000339 0.003889 -0.004060 0.013472
[[19]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.978262 0.000001 0.001087 NA NA -0.000238 0.001062 -0.002851 0.003679
[[19]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.980917 0.000001 0.000787 NA NA 0.000133 0.000777 0.001592 0.002690
[[19]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.853075 0.000007 0.002641 NA NA 0.001988 0.001741 0.024119 0.006030
[[19]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.198572 0.000015 0.003893 NA NA -0.000359 0.003883 -0.004295 0.013449
[[19]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.978231 0.000001 0.001012 NA NA -0.000252 0.000982 -0.003019 0.003401
[[19]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.980417 0.000001 0.000746 NA NA 0.000061 0.000745 0.000732 0.002580
[[19]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.868232 0.000006 0.002498 NA NA 0.001888 0.001639 0.022889 0.005679
[[19]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.199217 0.000016 0.004031 NA NA -0.001107 0.003883 -0.013202 0.013451
[[19]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.981450 0.000000 0.000672 NA NA -0.000130 0.000660 -0.001556 0.002287
[[19]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.984750 0.000000 0.000579 NA NA -0.000102 0.000571 -0.001218 0.001979
[[19]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.880573 0.000002 0.001496 NA NA -0.000009 0.001498 -0.000105 0.005189
[[20]]
[[20]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.099492 0.000034 0.005815 NA NA -0.000479 0.005804 -0.005734 0.020107
[[20]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.969670 0.000004 0.002018 NA NA -0.000291 0.002000 -0.003489 0.006929
[[20]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.969321 0.000003 0.001738 NA NA 0.000131 0.001736 0.001570 0.006014
[[20]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.885919 0.000016 0.004006 NA NA 0.003057 0.002593 0.037310 0.008984
[[20]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.099370 0.000034 0.005821 NA NA -0.000542 0.005805 -0.006479 0.020110
[[20]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.982921 0.000001 0.001118 NA NA -0.000354 0.001063 -0.004239 0.003681
[[20]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.984458 0.000001 0.000850 NA NA 0.000050 0.000850 0.000602 0.002943
[[20]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.917367 0.000008 0.002912 NA NA 0.002289 0.001803 0.027815 0.006245
[[20]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.104212 0.000035 0.005934 NA NA -0.001300 0.005799 -0.015491 0.020088
[[20]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.982326 0.000001 0.000945 NA NA -0.000168 0.000932 -0.002012 0.003227
[[20]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.984489 0.000001 0.000852 NA NA -0.000082 0.000850 -0.000983 0.002943
[[20]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.930560 0.000003 0.001623 NA NA 0.000214 0.001611 0.002576 0.005582
[[21]]
[[21]][[1]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.053959 0.000070 0.008341 NA NA -0.000534 0.008337 -0.006394 0.028881
[[21]][[2]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.972311 0.000019 0.004366 NA NA -0.000104 0.004372 -0.001246 0.015146
[[21]][[3]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.969723 0.000017 0.004121 NA NA 0.000574 0.004088 0.006905 0.014161
[[21]][[4]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.902690 0.000040 0.006300 NA NA 0.004049 0.004835 0.049679 0.016750
[[21]][[5]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.051538 0.000070 0.008359 NA NA -0.000681 0.008345 -0.008141 0.028908
[[21]][[6]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.983529 0.000005 0.002295 NA NA -0.000284 0.002281 -0.003405 0.007901
[[21]][[7]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.983660 0.000004 0.002022 NA NA 0.000185 0.002017 0.002217 0.006987
[[21]][[8]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.946058 0.000013 0.003652 NA NA 0.002632 0.002535 0.032047 0.008782
[[21]][[9]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.058585 0.000071 0.008448 NA NA -0.001443 0.008338 -0.017181 0.028883
[[21]][[10]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.982650 0.000002 0.001260 NA NA -0.000233 0.001240 -0.002797 0.004297
[[21]][[11]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.984481 0.000001 0.001160 NA NA -0.000155 0.001152 -0.001862 0.003990
[[21]][[12]]
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
0.952720 0.000004 0.001896 NA NA 0.000332 0.001869 0.003987 0.006476
evaluate <- function(model, per_in_year=12, wts=NULL) {
y_hat <- model$X %*% model$coefs
residuals <- y_hat - model$y
return(
c(
R2 = cor(y_hat, model$y) ^ 2
, MSE = mean(residuals^2)
, RMSE = sqrt(mean(residuals^2))
, WMSE = ifelse(!is.null(wts), t(model$wts) %*% residuals^2, NA)
, WRMSE = ifelse(!is.null(wts), sqrt(t(model$wts) %*% residuals^2), NA)
, alpha = mean(residuals)
, te = sd(residuals)
, alpha_y = (1 + mean(residuals)) ^ per_in_year - 1
, te_y = sd(residuals) * sqrt(per_in_year)
)
)
}
t(sapply(names(g13_models), function(x) {
model <- g13_models[[x]]
y <- model_data[ , index_ret]
X <- cbind(intercept=1, model_data[ , model$features, with=F])
Aeq <- c(0, rep(1, ncol(X) - 1))
beq <- 1
lb <- c(caim::NEG_INF, rep(0, ncol(X) - 1))
wts <- caim::d_exp(caim::halflife2decay(12), nrow(X))
fixed_coefs <- NULL
if (model$unity_coefs)
fixed_coefs <- c(0, rep(1/length(model$features), length(model$features)))
lmq <- caim::lm_quad(y, X, Aeq=Aeq, beq=beq, lb=lb, wts=wts, fixed_coefs=fixed_coefs)
# coefs <- round(lmq$coefs, 6)
# print(paste(x, coefs))
print(lmq$coefs)
return(round(evaluate(lmq), 6))
# return(as.matrix(c(model=x, t(round(evaluate(lmq), 6)))))
}))
intercept coup_inc_lin_2
0 1
intercept tot_ret_shift_2
0 1
intercept tot_ret_lin_2
0 1
intercept tot_ret_ns_2
0 1
intercept coup_inc_lin_1 coup_inc_lin_2 coup_inc_lin_3
0.0000000 0.3333333 0.3333333 0.3333333
intercept tot_ret_shift_1 tot_ret_shift_2 tot_ret_shift_3
0.0000000 0.3333333 0.3333333 0.3333333
intercept tot_ret_lin_1 tot_ret_lin_2 tot_ret_lin_3
0.0000000 0.3333333 0.3333333 0.3333333
intercept tot_ret_ns_1 tot_ret_ns_2 tot_ret_ns_3
0.0000000 0.3333333 0.3333333 0.3333333
intercept coup_inc_lin_1 coup_inc_lin_2 coup_inc_lin_3
-9.415735e-04 -1.629319e-15 -8.881784e-16 1.000000e+00
intercept tot_ret_shift_1 tot_ret_shift_2 tot_ret_shift_3
0.0001707531 0.3574075724 0.4676005452 0.1749918824
intercept tot_ret_lin_1 tot_ret_lin_2 tot_ret_lin_3
-0.0001469486 0.2658323621 0.5647934936 0.1693741443
intercept tot_ret_ns_1 tot_ret_ns_2 tot_ret_ns_3
-1.598000e-03 5.809298e-01 5.716268e-18 4.190702e-01
R2 MSE RMSE WMSE WRMSE alpha te alpha_y te_y
x_g13_coup_bullet 0.195397 1.5e-05 0.003898 NA NA -0.000339 0.003889 -0.004060 0.013472
x_g13_shift_bullet 0.978262 1.0e-06 0.001087 NA NA -0.000238 0.001062 -0.002851 0.003679
x_g13_lin_bullet 0.980917 1.0e-06 0.000787 NA NA 0.000133 0.000777 0.001592 0.002690
x_g13_ns_bullet 0.853075 7.0e-06 0.002641 NA NA 0.001988 0.001741 0.024119 0.006030
x_g13_coup_n 0.198572 1.5e-05 0.003893 NA NA -0.000359 0.003883 -0.004295 0.013449
x_g13_shift_n 0.978231 1.0e-06 0.001012 NA NA -0.000252 0.000982 -0.003019 0.003401
x_g13_lin_n 0.980417 1.0e-06 0.000746 NA NA 0.000061 0.000745 0.000732 0.002580
x_g13_ns_n 0.868232 6.0e-06 0.002498 NA NA 0.001888 0.001639 0.022889 0.005679
x_g13_coup_ladder 0.199217 1.6e-05 0.004031 NA NA -0.001107 0.003883 -0.013202 0.013451
x_g13_shift_ladder 0.981450 0.0e+00 0.000672 NA NA -0.000130 0.000660 -0.001556 0.002287
x_g13_lin_ladder 0.984750 0.0e+00 0.000579 NA NA -0.000102 0.000571 -0.001218 0.001979
x_g13_ns_ladder 0.880573 2.0e-06 0.001496 NA NA -0.000009 0.001498 -0.000105 0.005189
# model <- g13_models[["x_g13_coup_bullet"]]
#
# y <- model_data[ , index_ret]
# X <- cbind(intercept=1, g7_return_data[ , model$features, with=F])
# Aeq <- c(0, rep(1, ncol(X) - 1))
# beq <- 1
# lb <- c(caim::NEG_INF, rep(0, ncol(X) - 1))
# wts <- caim::d_exp(caim::halflife2decay(12), nrow(X))
#
# lmq <- caim::lm_quad(y, X, Aeq=Aeq, beq=beq, lb=lb, wts=wts)
# coefs <- round(lmq$coefs, 6)
# print(coefs)
# set.seed(1967)
# N <- 100
# x1 <- runif(N)
# x2 <- runif(N)
# wts <- caim::d_exp(caim::halflife2decay(12), N)
# z <- seq(0, 1, length.out=N)
# y <- z * x1 + (1-z) * x2
# X <- cbind(x1, x2)
# Aeq <- rep(1, ncol(X))
# beq <- 1
# lb <- rep(0, ncol(X))
#
# coefs <- round(caim::lm_quad(y, X, Aeq=Aeq, beq=beq, lb=lb), 6)
# print(coefs)
#
# coefs <- round(caim::lm_quad(y, X, Aeq=Aeq, beq=beq, lb=lb, wts=wts), 6)
# print(coefs)